#!/usr/bin/env python3
# -*- coding: utf-8 -*-

' a test module '

__author__ = " Joe"

class Student(object):
    def __init__(self,name,score):
        self.__name = name
        self.__score = score
    def print_score(self):
        print("name: %s  ---  score: %s" % (self.__name, self.__score))
    def get_grade(self):
        if self.__score >= 90:
            return 'A'
        elif self.__score >= 60:
            return 'B'
        else:
            return 'C'
    def set_score(self,score):
        if 0 <= score <= 100:
            self.__score = score
        else:
            raise ValueError("bad score")



lisa = Student("lisa",88)
joe = Student("joe",100)

print(Student)
print(lisa)
print(joe)


lisa.print_score()
joe.print_score()

print(lisa.get_grade())
print(joe.get_grade())

joe.set_score(11)
joe.print_score()
joe.set_score(99)
joe.print_score()

print(joe._Student__name)